from codex import * from time import sleep import random num = ["1", "2", "3", "4", "5", "6",] display.print("""Press A for instructions""", scale=3) sleep(1) display.print("__________________") display.print("""Press B to start""", scale=3) while True: if buttons.is_pressed(BTN_A): display.clear() display.print("""At the start of the game the die is rolled. You must then guess if the next roll will be higher or lower """) sleep(5) display.clear() display.print("""by using the UP or DOWN keys. To win get 4 in a row right. Game ends when you guess wrong.""") sleep(5) display.clear() display.print("Press B to start.") if buttons.is_pressed(BTN_B): display.clear() delay = 0 for i in range(15): display.print(random.choice(num), scale=12, background=RED, cursor_x = -1, cursor_y = 2) sleep(delay) delay = delay + 0.005